Skip to content

ci: pin build tooling to exact versions - #8442

Open
alexisLefebvre wants to merge 1 commit into
api-platform:4.3from
alexisLefebvre:pin-ci-tool-versions
Open

ci: pin build tooling to exact versions#8442
alexisLefebvre wants to merge 1 commit into
api-platform:4.3from
alexisLefebvre:pin-ci-tool-versions

Conversation

@alexisLefebvre

Copy link
Copy Markdown
Contributor
Q A
Branch? 4.3
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT
Doc PR

What

Every build tool the workflows install on the runner now has an exact version: soyuka/pmu (21 sites), php-coveralls/php-coveralls (5 sites), laravel/installer, @redocly/cli (was @latest), @quobix/vacuum, and php-documentation-generator. Project dependencies are untouched — the ^8.4 / ^2.5 / x-dev constraints in the test matrices are deliberate and stay as they are.

The two versions used more than once live in env: in ci.yml; single-use versions are written inline where they are installed.

php-documentation-generator has no usable tag — only v0.0.1 and a beta, while the workflow relies on main, which the project last pushed in September 2024. It is pinned to that branch's current commit rather than to a tag, so the installed code is fixed without changing which code runs.

No pin resolves lower than what CI installs today: pmu declares no PHP constraint, php-coveralls accepts ^7.4 || ^8.0, laravel/installer needs ^8.2 and its job runs PHP 8.5, and @redocly/cli 2.43.3 wants node >=20.19.0 <21 against that job's node-version: '20'. Each Composer spec was resolved with composer require --dry-run in a throwaway COMPOSER_HOME to confirm it lands on the intended version, including the dev-main#<commit> form.

Why

These tools are downloaded and executed on the runner, with the workflow's environment in reach. Unconstrained, they run whatever the registry serves on the day the job starts, so a single hijacked release lands in CI with no change on our side.

Packagist made published versions immutable in July 2026: once a stable version exists, its git reference is frozen and an upstream retag is rejected rather than followed. That makes an exact version genuinely exact, and it is why the documentation generator gets a commit instead — the immutability guarantee explicitly does not cover branch-tracking dev-* versions, which keep moving with the branch.

Worth knowing for review: no Dependabot ecosystem watches installs inside run: steps, neither composer global require nor npm install -g. These pins will only ever move when somebody moves them by hand.

🤖 Generated with Claude Code

These tools are installed and executed on the runner, so an unconstrained
version runs whatever the registry serves that day. Packagist freezes the
reference of a published version, but not of a branch, so the documentation
generator is pinned to a commit instead.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant